package com.itheima.clientAndService01;

public class DiGuiClass01 {
    public static void main(String[] args) {
        int result = getSum(100);
        System.out.println(result);
    }

    private static int getSum(int i) {
        if (i == 1) {
            return 1;
        }
        return i + getSum(i - 1);
    }
}
